package ke03.am;

import java.util.Vector;

public interface Database {

	/**
	 * Writes a vector under the given key into the database.
	 * 
	 * @param key
	 *            The key to use for writing vector data.
	 * @param v
	 *            vector data.
	 * @return whether the write operation was a success.
	 */
	public boolean write(int key, Vector<?> v);

	/**
	 * Reads a data vector from a given file.
	 * 
	 * @param key
	 *            The target vector's key.
	 * @return the target vector (the vector that is stored under the given key)
	 */
	public Vector<?> read(int key);

	/**
	 * Deletes the whole Database
	 * 
	 * @return true iff successful
	 */
	public boolean drop();

	/**
	 * Delete one specific row
	 * 
	 * @param key
	 * @return true iff successful
	 */
	public boolean delete(int key);

}